package com.atguigu.gulimall.search.vo;

import com.atguigu.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * @author 满超
 * @date 2020/06/07
 **/
@Data
public class SearchResult {

    //查询到的所有商品信息
    private List<SkuEsModel> products;

    /**
     * 分页信息
     */
    private Integer pageNum;//当前页码
    private Long total;// 总页数
    private Integer totalPage;//总页码
    private List<Integer> pageNavs;//导航页码
    private List<BrandVo> brands;//当前查到的结果
    private List<AttrVo> attrs;
    private List<CatalogVo> catalogs;


    /**
     * 面包屑导航
     */
    private List<NavVo> navs;

    @Data
    public static class NavVo{
        private String navName;
        private String navValue;
        private String link;
    }

    //返还给页面的信息

    /**
     * 分类信息
     */
    @Data
    public static class CatalogVo {
        private Long catalogId;
        private String catalogName;
    }

    /**
     * 品牌信息
     */
    @Data
    public static class BrandVo {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    /**
     * 属性信息
     */
    @Data
    public static class AttrVo {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
}
